package com.springboot.demo.order;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.springboot.demo.user.User;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Date;

@JsonIgnoreProperties(value = {"handler"})
public class Order {

//    public Order(Integer orderId) {
//        this.orderId = orderId;
//    }

    private Integer orderId;
    private Double amount;
    private OrderStateEnum state;
    private Integer createUserId;
    private User createUser;
    private Date createTime;
    private ArrayList<OrderItem> orderItems;

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public OrderStateEnum getState() {
        return state;
    }

    public void setState(OrderStateEnum state) {
        this.state = state;
    }

    public Integer getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    public User getCreateUser() {
        return createUser;
    }

    public void setCreateUser(User createUser) {
        this.createUser = createUser;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public ArrayList<OrderItem> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(ArrayList<OrderItem> orderItems) {
        this.orderItems = orderItems;
    }
}
